<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>企业信息管理系统_用户登录</title>
<include file="./core/Modules/Center/Tpl/Public/js_css_header.html" />
<style type="text/css">
<!--
.STYLE1 {color: #000000;font-size: 12px;}
-->
</style>
<script type="text/javascript">
$(function(){
	document.onkeydown = function(e){ 
	    var ev = document.all ? window.event : e;
	    if(ev.keyCode==13) {
			formsubmit();
	    }
	}
});
function formsubmit(){
	var adminNameVal = $("#admin_name").val();
	var adminPwdVal = $("#admin_pwd").val();
	$.post("__APP__/center/login/loginProcess/", { admin_name: adminNameVal, admin_pwd: adminPwdVal },
	   function(data){
			var result = $.parseJSON(data);
			if(result.status == 0){
				alert(result.msg);
				return;		
			}
			window.location.href="__APP__/center/frame/main/"; 
	   });
}
//获取范围内的随机数
function getRandom(n){
	return Math.floor(Math.random()*n+1);
}
jQuery.fn.shake = function(intShakes/*Amount of shakes*/, intDistance/*Shake distance*/, intDuration/*Time duration*/) {
	this.each(function() {
		var jqNode = $(this);
		jqNode.css({position: 'relative'});
		for (var x=1; x<=intShakes; x++) {
			jqNode.animate({ left: (intDistance * -1) },(((intDuration / intShakes) / 4)))
			.animate({ left: intDistance },((intDuration/intShakes)/2))
			.animate({ left: 0 },(((intDuration/intShakes)/4)));
		}
	});
	return this;
}
$(function(){
	var i = getRandom(3);
	$("#login_bgs").attr("src","__IMAGES4ADMIN__/bg"+i+".jpg")
	$(".login_block").shake(1,100,1000);
});
</script>
</head>

<body>

<div class="login_bg">
	<img id="login_bgs" src="__IMAGES4ADMIN__/bg1.jpg" />
	<!-- 登录框 开始 -->
	<div class="login_block">
		<div class="login_head"><img src="__IMAGES4ADMIN__/login_head.jpg" width="360"/></div>
		<div class="login_body">
			<h1>用户登录&nbsp;Login</h1>
			<div class="login_line"><input type="text" id="admin_name" name="admin_name" class="text" value="请输入用户名......" onblur="if(this.value=='') this.value='请输入用户名......';" onfocus="if(this.value=='请输入用户名......') this.value='';" style="height:30px;line-height:30px;width: 100%;color:gray;"/></div>
			<div class="login_line"><input type="text" id="admin_pwd" name="admin_pwd" class="text" value="请输入密码......" onfocus="if(this.value==defaultValue) {this.value='';this.type='password'}" onblur="if(!value) {value=defaultValue; this.type='text';}" style="height:30px;line-height:30px;width: 100%;color:gray;"/></div>
			<div class="loginbtn"><a href="javascript:formsubmit();" target="_self">登&nbsp;&nbsp;录</a></div>
			<div class="tip">
				<iframe src="http://i.tianqi.com/index.php?c=code&id=34&icon=1&num=3" width="300" height="20" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>
				<div class="tip_w">全方位360度SEO优化___企业网站管理系统：4JCMS！</div>
			</div>
		</div>
	</div>
	<!-- 登录框 结束 -->
</div>
</body>
</html>